<?php

class LocataireController extends Zend_Controller_Action 
{
	public function init()
	{
		/* Initialize action controller here */
	}
	
	public function indexAction()
	{
		
	}
	
	public function addAction()
	{
		$request = $this->getRequest();
		$form = new Application_Form_AddLocataire();
		
		if ($this->getRequest()->isPost()) {
			if ($form->isValid($request->getPost())) {
				$comment = new Application_Model_Locataire($form->getValues());
				$mapper  = new Application_Model_LocataireMapper();
				$mapper->save($comment);
				return $this->_helper->redirector('index','index');
			}
		}
		
		$this->view->form = $form;
	}
	
	public function listAction()
	{
		
	}
}

?>